package com.itlong.cloud.iottp;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/** 短信模块接口代理
 * Created by cuiduanwu on 2017/9/22.
 */
@FeignClient(name = "iot-tp-service")
public interface IIotTpSmsServiceClient {
    /** 根据手机号发送短信验证码
     *
     * @param phoneNo 发送验证码的手机号码
     * @param content 发送的短信内容
     * @return
     */
    @RequestMapping(path = "/iotTp/sms/sendSmsCodeByPhone",method = RequestMethod.POST)
    boolean sendSmsCodeByPhone(@RequestParam("phoneNo") String phoneNo, @RequestParam("content") String content);

    /** 根据邮箱发送短信验证码
     *
     * @param email 发送验证码的邮箱
     * @param content 发送的短信内容
     * @return
     */
    @RequestMapping(path = "/iotTp/sms/sendSmsCodeByEmail",method = RequestMethod.POST)
    boolean sendSmsCodeByEmail(@RequestParam("email") String email, @RequestParam("content") String content);

}
